<?php

namespace app\api\model;

use app\common\facade\auth\Auth;
use think\Model;

class ShortUrl extends \app\model\ShortUrl
{



    public static function onBeforeInsert(Model $shortUrl)
    {
        /**
         * @var \app\model\ShortUrl $shortUrl
         */
        $shortUrl->agent_id = Auth::agentId();
        $shortUrl->user_id = Auth::id();
        $shortUrl->channel_id = Auth::channelId();
    }

}